package com.wjerp.tplus.server.common.utils;

import com.github.cage.image.EffectConfig;
import com.github.cage.image.Painter;

import java.awt.*;
import java.util.Random;

public class BCage extends com.github.cage.Cage {

    /**
     * Height of CAPTCHA image.
     */
    protected static final int HEIGHT = 80;

    /**
     * Width of CAPTCHA image.
     */
    protected static final int WIDTH = 200;

    /**
     * Constructor.
     */
    public BCage() {
        this(new Random());
    }

    /**
     * Constructor.
     *
     * @param rnd
     *            object used for random value generation. Not null.
     */
    protected BCage(Random rnd) {
        super(new Painter(WIDTH, HEIGHT, Color.WHITE, Painter.Quality.MAX, new EffectConfig(), rnd),
                null, null, null, DEFAULT_COMPRESS_RATIO, null, null);
    }

}

